<template>
  <el-dialog title="积分赠送详情" :close-on-click-modal="false" :visible.sync="visible" center fullscreen>
    <el-button class="miui-dialog-close-btn" @click="visible = false">关闭页面</el-button>
    <el-form :model="dataForm" ref="dataForm" label-width="110px">
      <el-row>
        <el-col :span="8">
          <el-form-item label="会员卡号" prop="customerCard">
            <el-input v-model="dataForm.customerCard" readonly>
              <!-- <el-button slot="append" icon="el-icon-search" @click="queryCustomerList">选择</el-button> -->
            </el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="会员姓名">
            <el-input v-model="dataForm.customerName" readonly></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="会员电话">
            <el-input v-model="dataForm.phone1" readonly></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="8">
          <el-form-item label="积分变更">
            <el-input v-model="dataForm.changeIntegral" readonly></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="变更人">
            <el-input v-model="dataForm.createUsername" readonly></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="变更时间" prop="createTime">
            <el-input v-model="dataForm.createTime" readonly></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="24">
          <el-form-item label="备注" prop="comlainContent">
            <el-input v-model="dataForm.memo" type="textarea" readonly></el-input>
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
  </el-dialog>
</template>

<script>
  import { customerIntegralChangeDetail } from '@/api/eims/customer-integral.js'
  export default {
    data() {
      return {
        visible: false,
        dataForm: {
          customerCard: '',
          customerName: '',
          phone1: '',
          integral: '',
          changeIntegral: '',
          memo: ''
        }
      }
    },
    methods: {
      init(id) {
        this.dataForm.id = id || 0
        this.visible = true
        this.$nextTick(() => {
          this.$refs['dataForm'].resetFields()
          if (this.dataForm.id) {
            customerIntegralChangeDetail(this.dataForm.id).then(response => {
              if(response.data.code == '0'){
                this.dataForm = response.data.data
              }else{
                this.$message.error(response.data.msg)
              }
            })
          }
        })
      },
    }
  }
</script>

<style>
</style>
